import { Notification, Message } from 'element-ui'

export const successMessage = params => {
  return Message({
    message: params,
    type: 'success'
  })
}

export const errorMessage = params => {
  return Message({
    message: params,
    type: 'error'
  })
}
export const errorAlert = params => {
  return Notification({
    title: '错误',
    // type: 'error',
    message: params,
    position: 'bottom-right',
    customClass: 'el-notification-error',
    // duration: 0,
    iconClass: 'el-icon-circle-close-outline'
  })
}

export const successAlert = params => {
  return Notification({
    title: '操作成功',
    // type: 'success',
    message: params,
    position: 'bottom-right',
    customClass: 'el-notification-success',
    iconClass: 'el-icon-circle-check-outline'
  })
}

const myMessage = params => {
  successMessage(params)
  errorMessage(params)
  errorAlert(params)
  successAlert(params)
}

export default myMessage
